package com.wandian.ui.controls
{
	import com.wandian.ui.events.ToggleButtonEvent;

	public class ToggleButton extends LabelButton
	{
		private var _selected:Boolean=false;

		public function ToggleButton(w:int=100, h:int=32)
		{
			super(w, h)
		}

		public function set selected(v:Boolean):void
		{
			if (_selected == v)
			{
				return;
			}
			_selected=v;
			this.invalidateDisplay();
			//this.dispatchEvent(new ToggleButtonEvent(ToggleButtonEvent.SelectedChanged, _selected));
		}

		public function get selected():Boolean
		{
			return _selected;
		}
	}
}
